<?php
//require_once(dirname(__FILE__) . '/../core/mmw_core_ApplicationRegistry.php');
require_once(dirname(__FILE__) . '/../mapper/mmw_mapper_TagMapper.php');
require_once(dirname(__FILE__) . '/../domain/mmw_domain_Tag.php');

$tagContent='whatever5';
$tagContentLike='prog';

$tag=new mmw_domain_Tag();
$tag->setTag($tagContent);

$tagMapper=new mmw_mapper_TagMapper();

$tagMapper->insert($tag);

echo 'id:'.$tag->getId();

$tag2=$tagMapper->findByTag($tagContent);

echo 'id2:'.$tag2->getId();

$tagMapper->delete($tag->getId());

$arTags=$tagMapper->findByTagLike($tagContentLike);

echo "arTags count:".count($arTags)."<br/>";

for ($i=0;$i<count($arTags);$i++) {
    echo $arTags[$i]->getId()." ".$arTags[$i]->getTag()."<br/>";
}

?>
